<style>
.lien-popup span
{								   
    position       :  absolute;
    top            :  -2000em;
    left           :  -2000em;
    width          :  1px;
    height         :  1px;
    overflow       :  hidden; 
    background     :  #ffffe1;   /* D�finition du fond, sinon on a le m�me que notre lien */
    border         :  1px solid #000000; /* D�finition des bordures */
    text-decoration: none;
    color: black;
    text-align: left;
}  


.lien-popup:hover span
{								   
	top        :  auto;
    left       :  auto;
    width      :  300px;
    height     :  auto;
    overflow   :  visible;
}  

</style>

<div class="grid">
    <table cellspacing="0" class="data" width="100%">
    	<thead>
            <tr class="headings">
                <th class="a-center"><?php echo $this->__('Position'); ?></th>
                <th class="a-center"><?php echo $this->__('Name'); ?></th>
                <th class="a-center"><?php echo $this->__('Size'); ?></th>
                <th class="a-center"><?php echo $this->__('Content'); ?></th>
                <?php if ($this->_Type == 'export'): ?>
	                <th class="a-center"><?php echo $this->__('Format'); ?></th>
	                <th class="a-center"><?php echo $this->__('Format argument'); ?></th>
	            <?php endif; ?>
                <th class="a-center"><?php echo $this->__('Delete'); ?></th>
            </tr>
        </thead>
        <tbody>
        	<?php foreach($this->getFields() as $field): ?>
        		<tr>
	        		<td class="a-center"><input type="text" size="3" name="fields[<?php echo $field->getId(); ?>][ctf_position]" id="fields[<?php echo $field->getId(); ?>][ctf_position]" value="<?php echo $field->getctf_position(); ?>"></td>        		
	        		<td class="a-center"><input type="text" name="fields[<?php echo $field->getId(); ?>][ctf_name]" id="fields[<?php echo $field->getId(); ?>][ctf_name]" value="<?php echo $field->getctf_name(); ?>"></td>        		
	        		<td class="a-center"><input type="text" size="3" name="fields[<?php echo $field->getId(); ?>][ctf_size]" id="fields[<?php echo $field->getId(); ?>][ctf_size]" value="<?php echo $field->getctf_size(); ?>"></td>        		
	                <?php if ($this->_Type == 'export'): ?>
		        		<td class="a-center"><input type="text" name="fields[<?php echo $field->getId(); ?>][ctf_content]" id="fields[<?php echo $field->getId(); ?>][ctf_content]" value="<?php echo htmlentities($field->getctf_content(), ENT_QUOTES); ?>"> <a href="#" class="lien-popup"><img src="<?php echo $this->getSkinUrl('images/Organizer/comments.gif'); ?>"><span><?php echo $this->getUsableCodesInstructions(); ?></span></a></td>        		
		        		<td class="a-center"><?php echo $this->getFormatCombo('fields['.$field->getId().'][ctf_format]', $field->getctf_format()); ?></td>
		        		<td class="a-center"><input type="text" name="fields[<?php echo $field->getId(); ?>][ctf_format_argument]" id="fields[<?php echo $field->getId(); ?>][ctf_format_argument]" value="<?php echo $field->getctf_format_argument(); ?>"></td>        		
		        	<?php else: ?>
		        		<td class="a-center"><?php echo $this->getImportContentAsCombo('fields['.$field->getId().'][ctf_content]', $field->getctf_content()); ?></td>        		    			        	
		        	<?php endif; ?>
	        		<td class="a-center"><input type="checkbox" name="fields[<?php echo $field->getId(); ?>][delete]" id="fields[<?php echo $field->getId(); ?>][delete]" value="1"></td>
        		</tr>
        	<?php endforeach; ?>
    	<thead>
        	<tr class="headings">
        		<th colspan="<?php echo ($this->_Type == 'export'?'7':'5'); ?>" class="a-center">Add New Field</th>
        	</tr>
        </thead>
        <tbody>
        	<tr>
        		<td class="a-center"><input type="text" size="3" name="fields[new_<?php echo $this->_Type; ?>][ctf_position]" id="fields[new][ctf_position]"></td>        		
        		<td class="a-center"><input type="text" name="fields[new_<?php echo $this->_Type; ?>][ctf_name]" id="fields[new][ctf_name]"></td>        		
        		<td class="a-center"><input type="text" size="3" name="fields[new_<?php echo $this->_Type; ?>][ctf_size]" id="fields[new][ctf_size]"></td>        		
                <?php if ($this->_Type == 'export'): ?>
	        		<td class="a-center"><input type="text" name="fields[new_<?php echo $this->_Type; ?>][ctf_content]" id="fields[new][ctf_content]"> <a href="#" class="lien-popup"><img src="<?php echo $this->getSkinUrl('images/Organizer/comments.gif'); ?>"><span><?php echo $this->getUsableCodesInstructions(); ?></span></a></td>        		
	        		<td class="a-center"><?php echo $this->getFormatCombo('fields[new_'.$this->_Type.'][ctf_format]', ''); ?></td>
	        		<td class="a-center"><input type="text" name="fields[new_<?php echo $this->_Type; ?>][ctf_format_argument]" id="fields[new][ctf_format_argument]"></td>        		
	        	<?php else: ?>
	        		<td class="a-center"><?php echo $this->getImportContentAsCombo('fields[new_'.$this->_Type.'][ctf_content]', ''); ?></td>        		    	
	        	<?php endif; ?>
        		<td>&nbsp;</td>
        	</tr>
        </tfoot>
    </table>
</div>
